<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    <title>psqlODBC release notes</title>
  </HEAD>

  <body bgcolor="#ffffff" text="#000000" link="#ff0000" vlink="#a00000" alink="#0000ff">

<h1>psqlODBC release notes</h1>
<hr>
<h2><a id="10.03.0000">psqlODBC 10.03.0000 Release</a></h2>
Changes:<br />
<ol type="1">
<li>Put back the handling of lock_CC_for_rb variable.
The variable lock_CC_for_rb should be held per connection.</li>
Per report from Ayman Samamry.
<li>Fix SQLGetTypeInfo() so that it filters SQL_TYPE_DATE, SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP for ODBC 2.x applications.</li>
Per report from Oleg Tonkikh.
<li>Revise ConfigDSN() so that it handles the 4th parameter(lpszAttribues) correctly.</li>
Per report from Haribabu Kommi.
<li>Fix a crash bug when handling error messages.
Also modified some error messages.</li>
<li>Let SQLTables() or SQLTablePrivileges() show partition tables.</li>
<li>Fix build on Solaris defined(__SUNPRO_C) using Solaris Studio</li>
<li>Reduce DB access to pg_class or pg_index by caching relhasoids, relhassubclass etc.
It would improve the performance of SQLSetPos() or SQLBulkOperations() very much in some cases.</li>
Per report from Takayuki Tsunakawa.
</ol><br />
<h2><a id="10.02.0000">psqlODBC 10.02.0000 Release</a></h2>
Changes:<br />
<ol type="1">
<li>It's safer to call setlocale(LC_CTYPE, "") than calling setlocale(LC_ALL, "").</li>
Report and patch by Mario De Frutos.
<li>Avoid replacing effective notice messages.</li>
Report from Wolfgang Apolinarski. <br />
Patch by Clemens Ladisch.
<li>Handle MALLOC/REALLOC errors while fetching tuples more effectively.</li>
Per report from Haruka Takatsuka.
<li>Make SQLSetPos(SQL_DELETE/SQL_REFRESH) more effective.
Because queries calling currtid(2) like<br />
select .. from .. where ctid=currtid2(.., ..)<br />
cause Seq Scan, their execution may be very slow.<br />
It is better to execute queries using subqueries like<br />
select .. from .. where ctid=(select currtid2(.., ..))<br />
because they cause Tid Scan.<br />
Report and changes by Tsunakawa Takayuki.
<li>Fix a crash bug in AddDeleted().</li>
Report and patch by Takayuki Tsunakawa.
</ol><br />
<h2><a id="10.01.0000">psqlODBC 10.01.0000 Release</a></h2>
Changes:<br />
<ol type="1">
<li>Call Get-VSSetupInstance to detect Visual Studio installations whose version >= 15 when VSSetup module is available.</li>
<li>Review the handling of @@IDENTITY when a column's default is nextval(a_sequence) but the column isn't a serial. Unfortunately the function pg_get_serial_sequence() doesn't work for sequences which aren't serial type.</li>
<li>Add add an option -NoPDB to buildInstallers.ps1.</li>
The switch option can be specified so as to exclude PDB files from the installers.
<li>Fix a bug in pgdebug_realloc().</li>
<li>Free any data at exec params before the statement is executed again or the next set of parameters is processed. If not, then there will be a memory leak when the next SQLParamData/SQLPutData is called.</li>
Per report from Mihai Giurgeanu
<li>Review the level of MYLOG, QLOG.</li>
Divide *level 1(detail)* log into *level 1(tuple level)* log and *level 2(detail)* log.
</ol><br />
<h2><a id="10.00.0000">psqlODBC 10.00.0000 Release</a></h2>
Changes:<br />
<ol type="1">
<li>Fix multibyte handling of ansi driver.</li>
<li>Handle PG 10 identity columns.</li>
<li>For PG10 servers, we will never see "unknown" output columns.</li>
<li>Improve @@identty handling.</li>
Use multibyte-aware eatTableIdentifiers() instead of next_name_token().<br />
Use identifierEscape() to escape single quotes or double quotes.
<li>PG_PRINTF_ATTRIBUTE instead of printf in __attribute__((format(printf, .., ..))) function attribute.</li>
<li>Review the use of encoded_nextchar().</li>
Remove variables which work in conjunction with encstr(encoded_str) so as to avoid misleadingness.
<li>Use pg_get_serial_sequence() to get serial sequence of identity columns or serial columns. </li>
pg_get_serial_sequence() for identity columns became available in PG 10.
<li>Preparation for development with VC15(VS 2017).</li>
<li>Fix the bug that 'create table T_$001 (\81c)' fails when useServerSidePrepare is turned on.</li>
Per report from Gregory Pruss.
</ol><br />
<h2><a id="09.06.0500">psqlODBC 09.06.0500 Release</a></h2>
Changes:<br />
<ol type="1">
<li>Fix a segfault on ResolveOneParam() function while executing a query after calling SQLSetStmtAttr(.., SQL_ATTR_APP_PARAM_DESC, an_ARD_for_another_statement, ..).</li>
<li>Fix a linkage error when doing installcheck for test/win.mak.</li>
Report and patch by Kazuki Uehara.
<li>Fix a bug when fetching bytea field to SQL_C_BINALY data. It's bad to double count of bytes.</li>
<li>Handle '$'s in identifiers correctly. Also take multibyte characters into account in identifiers.</li>
<li>Reduce the use of snprintfcat(or SPRINTFCAT_FIXED macro) as much as possible. Instead use PQExpBuffer library without having to worry about buffer length.</li>
<li>Use macro MYLOG instead of function mylog in preparation for later changes and unify mylog() and inolog() using level parameter.
Enable the compiler to check the format string against the parameter of mylog() by adding __attribute__((format(printf,.,.))) to the declaration of mylog(GCC only).
 Using this mechanism, check and fix many discordances of parameters.</li>
<li>Implement myprintf() which prints logs according to printf format and make logs a little easier to read using the macro MYPRINTF() which calls myprintf().</li>
<li>Introduce token control while parsing. Detect *select .. into* or *select ... for update* and suppress *declare .. cursor for* clause in declare/fetch mode using the mechanism.</li>
<li>Add __FILE__, __FUNCTION__, __LINE__ to MYLOG.</li>
<li>Fix an parameter unmatch error which would cause a crash.</li>
<li>Removed some qlogs, changed some qlogs to MYLOG and added some qlogs.</li>
<li>Move the implemetation of GetExeName() from psqlodbc.c(psqlsetup.c) to mylog.c.</li>
<li>Remove the GssAuthUseGssapi option completely.</li>
<li>Fix bug that calls strdup() for NULL pointers.</li>
Per report from Ding, Haiqiang.
<li>Detect fast shutdown while connecting.</li>
<li>Put back the behavior when conversion errors from the current locale to SQLWCHAR occur.
 Simply returns zero length string instead of erroring out.</li>
Per report from Andrus.
<li>Add level parameter to Commlog/Mylog option of setup program.</li>
<li>Add __attribute__((format(printf,3,4))) to the declaration of snprintfcat().</li>
<li>Allow PROCCALL in ReadOnly mode.</li>
Per report from Matej Mihelic.
</ol><br />
<h2><a id="09.06.0410">psqlODBC 09.06.0410 Release</a></h2>
Changes:<br />
<ol type="1">
<li>Fix buffer truncations. The truncations occured when concatenating 'RELEASE xxxx...;' and 'SAVEPOINT xxxx....'.</li>
Per reported by Pavel Raiskup.
<li>Correct the behavior of snprintfcat() on Windows using posix_vsnprintf() instead of _vsnprintf().</li>
<li>Handle StrLen_or_IndPtr argument of SQLBindParameter() properly when StrLen_or_IndPtr doesn't point to SQL_NTS and conversions between SQLWCHAR and SQLCHAR occur.</li>
This change fixes MSACCESS errors reported by Christian Ullrich and Robert Ball.
<li>Make quote_table() and ti_quote() thread safe.This change fixes "relation does not exist".</li>
Per report and patch by Scott Beil.
</ol><br />
<h2><a id="09.06.0400">psqlODBC 09.06.0400 Release</a></h2>
Changes:<br />
<ol type="1">
<li>Reorganize the language conversion between the current locale and unicode.<br /></li>
<li>Make a function setup_getdataclass() separating from long confusing if-block in convert_text_field_to_sql_c() and clarify the parameters. <br /></li>
<li>Implement SC_get_localtime() and reduce time()/localtime() calls.<br /></li>
<li>Visual C++ 14 provides snprintf().<br /></li>
<li>Fix a crash bug in SQLBulkOperations() under use_declare/fetch off mode.<br /></li>
<li>Clean up the use of 'internal' member of StatementClass.<br /></li>
<li>Fix an infinite loop of CC_on_commit. The loop occurs when checking whether cursors are alive using 'MOVE 0' in CC_clear_cursors().<br /></li>
<li>Fix the bug, skip malloc(0) in build_libpq_bind_params(). malloc(0) seems to return NULL on AIX, whereas it returns non-NULL on Windows or linux.<br /></li>
Per reported by Keith Handlon.
<li>Add support for foreign tables and matviews in SQLTables.<br /></li>
<li>Documentation fix for the 'PROTOCOL=' option. It's out of sync with the current driver behavior (since 09.05.0100).<br /></li>
Patch by Jan Wieck.
<li>Fix more bugs with returning NULL for malloc(0).<br /></li>
Patch by TAKATSUKA Haruka.
</ol><br />
<h2><a id="09.06.0310">psqlODBC 09.06.0310 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Fix a crash bug when connecting from MSACCESS(Microsoft Jet)</b><br /></li>
Per reported by Robert Ball.<br />
This occurs when MSACCESS(Jet) calls SQLConnectAttr(.., 30002, ..) => ucs2_to_utf8() and about to call mylog() with a NULL derefernced pointer parameter.
</ol><br />
<h2><a id="09.06.0300">psqlODBC 09.06.0300 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Implement SQLSet/GetConnectAttr() for some driver specific options.</b><br /></li>
<li><b>Modify the code about UNKNOWNS_AS_LONGEST of the Unknown Sizes option so that it works properly.</b><br /></li>
<li><b>Revise the handling of show oid column and row versioning option.</b><br /></li>
<li><b>Revise the use of pgtype_xxxx() in catalog functions.</b><br /></li>
<li><b>Replace pgtype_xxxx() whose 1st parameter is StatementClass with pgtype_attr_xxxx(). </b><br /></li>
Also use macros for pgtype_xxxx() calls which have PG_ATP_UNSET, PG_ADT_UNSET or PG_UNKNOWNS_UNSET parameters.
<li><b>Remove the use of PG_STATIC and UNKNOWNS_AS_DEFAULT.</b><br /></li>
<li><b>Remove UNKNOWNS_AS_CATALOG of Unknown Sizes option.</b><br /></li>
<li><b>Use symbols defined in catfunc.h instead of literal column numbers in SQLGetTypeInfo(), SQLSpecialColumns() and SQLTablePrivileges().</b><br /></li>
<li><b>Fixes about SQLDescribeCol() or SQLColAttribute().</b><br /></li>
<ol type="a">
<li>Report the size of constant strings using Unknown Sizes as Longest.</li>
<li>Correct the inconsistency between the sqltype of PG_TYPE_TEXT or PG_TYPE_UNKNOWN and the size in case of Unknown Sizes as Longeset.</li>
</ol>
<li><b>Fix a bug about Unicode driver for ansi apps.</b><br /></li>
<li><b>Fix a dangling reference in CC_lookup_characterset() introduced.</b><br /></li>
<li><b>Simple implementation of get_environment_setting() on non-Windows platforms.
If the codeset part of the current locale is UTF8, set the client_encoding to 'UTF8'.
Take * set client_coding='...' * into account in check_client_coding().</b><br /></li>
<li><b>Revise the handling of client encoding so as not to forget the update of related items(ccsc or mb_maxbyte_per_char).</b><br /></li>
<li><b>Change the max byte per char of UTF8 from 6 to 4.</b><br /></li>
<li><b>For Unicode drivers, when SQLConnect() or SQLDriverConnect() instead of SQLConnectW or SQLDriverConnectW is called, use the same client encoding as ANSI version of drivers use.Stop using percent-encoding to store the conn_settings option in odbc.ini.</b><br /></li>
<li><b>Stop using percent-encoding to store the conn_settings option in odbc.ini.</b><br /></li>
<li><b>Add #ifdef UNICODE_SUPPORT where there should be.</b><br /></li>
<li><b>Introduce locale_encoding which corresponds to the locale. For non-Windows platforms determine the locale encodings from the current locale.</b><br /></li>
<li><b>Make a function convert_text_field_to_sql_c() simply extracting from long confusing code and clarify the parameters for subsequent modifications.</b><br /></li>
<li><b>Handle locales in non-Windows platforms and overhaule the language system.</b><br /></li>
<li><b>convert bad to use lf_conv here.</b><br /></li>
<li><b>Add __STDC_ISO_10646__ check to confirm that wchar_t means unicode.</b><br /></li>
<li><b>Error out when SQLSetPos() skips updates.</b><br /></li>
<li><b>Don't reset the status of Keyset in case of updates.</b><br /></li>
This fixes the bug about repeated updates using SQLSetPos().
<li><b>Correct the inappropriate use of set_nullfield_int2().</b><br /></li>
<li><b>Review the handling of OUTPUT parameters in SQLProcedureColumns().</b><br /></li>
<ol type="a">
<li>If there are OUT, INOUT or TABLE arguments, ignore RETURN values.</li>
<li>OUT parameters of functions with returning SETOF should be treated as SQL_RESULT_COL rather than SQL_PARAM_OUTPUT.</li>
<li>Also treat table output arguments as SQL_RESULT_COL because functions returning table are equivalent to using one or more OUT parameters plus marking the function as returning SETOF record (or SETOF a single output parameter's type).</li>
</ol>
<li><b>Use the same CPPFLAGS as well as CFLAGS/LDFLAGS to build regression tests as used to build driver.Also uchar.h header checking for later use.</b><br /></li
<li><b>Fix a crash bug when the locale isn't set connection.
</ol><br />
<h2><a id="09.06.0200">psqlODBC 09.06.0200 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Start transactons first before calling SQLEndTran().</b><br /></li>
<li><b>The failure of libpq_bind_exec() which returns NULL doesn't mean a FATAL error.
 Also make a check for disconnected connections.</b><br /></li>
<li><b>Handle output parameters properly in build_libpq_bind_params.Also handle return values properly.</b><br /></li>
<li><b>Make check of connection lost.</b><br /></li>
<li><b>Revise recent lost connection check.</b><br /></li>
Check the lost connection<br />
<ol type="a">
<li>at the beginning of ODBC APIs.<br /></li>
<li>at the beginning of FE-BE communications using extended protocol.<br /></li>
</ol>
<li><b>Stop specifying parameter datatype oids in parse message. Unfortunately it is inflexible
 and rather harmful. Though I don't know if it has much meaning, use cast instead just in order
 to keep regression test results. It's not necessary to cast any more the 2nd parameter of
 {call a_b_c_d_e(?, ?, ?, ?, ?)} in odbc-escapes-test.
</b><br /></li>
</ol><br />
<h2><a id="09.06.0100">psqlODBC 09.06.0100 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Optimization of a build system.</b><br /></li>
some adjustment and support Visual Studio 2015 for Windows.
<li><b>Use SIZEOF_LONG_INT to check whether SQLROWSETSIZE exists.</b><br /></li>
SIZEOF_LONG_INT is defined in UnixODBC headers, while SIZEOF_LONG is defined
by psqlodbc's ./configure. In odbcapi.c, we use it to determine what format
modifier, %ld or %lld, to use for pointers. (Why don't we use %p?). We should
rely on our autoconf check for that. In odbcapi.c, however, the check should
match that in the ODBC headers, to determine whether SQLROWSIZE exists, so
we should use SIZEOF_LONG_INT.
<li><b>Fix the bug messages handle.</b><br /></li>
handle_error_message() and handle_notice_message() were unified into handle_pgres_error() in the wrong way.
Unfortunately handle_error_message() never handled notice messages and set positive errornumbers which mean
 error_not_a_notice in psqlodbc. 
I renamed the constant CONNECTION_SERVER_REPORTED_ERROR to CONNECTION_SERVER_REPORTED_SEVERITY_FATAL and 
the constant CONNECTION_SERVER_REPORTED_WARNING to CONNECTION_SERVER_REPORTED_SEVERITY_ERROR so as to avoid
 confusion.<br />
Reported by Shinji Mecha.
<li><b>Allow setting isolation level before the establishment of connection.</b><br /></li>
<li><b>Fixed return proper sqlstate error 08S01 in case of communication link failures.</b><br /></li>
Patch by Tsunakawa,Takayuki.
<li><b>Check the existence of directory for logging.</b><br /></li>
<li><b>Handle PG_DIAG_SEVERITY_NONLOCALIZED for servers whose version >= 9.6 so as to detect FATAL message properly.</b><br /></li>
<li><b>Now default isolation level is server's default instead of fixed SQL_TXN_READ_COMMITTED.</b><br /></li>
Patch by Tsunakawa,Takayuki.
<li><b>Make sure the isolation level is SQLUINTEGER and add the declaration of CC_get_isolation().</b><br /></li>
<li><b>Change the default for ExtraSysTablePrefixes to an empty string.</b><br /></li>
<li><b>Use lo_lseek64(lo_tell64) instead of lo_lseek(lo_tell) if the server's version >= 9.3. We are now able to handle > 2GB BLOBs.</b><br /></li>
<li><b>Implement SQL_FECTH_BY_BOOKMARK operation of SQLBulkOperations properly.</b><br /></li>
<li><b>Enable SQLBulkOperations in declare/fetch mode using long (>=12bytes) bookmarks.</b><br /></li>
Formerly the driver offered very simple bookmark support -- it is just
the current row number. Now the driver offers more verbose bookmarks which
contain KeySet informations (CTID (+ OID)). Though they consume 12bytes
(row number + CTID) or 16bytes (row number + CTID + OID), they are useful
in declare/fetch mode.
<li><b>a hack to handle boolean items in VBA with MS Access.</b><br /></li>
VBA seems to transform the where condition
a_boolean_item=True
into
("a_boolean_item" = 1)
which causes an ERROR:Operator does not exist boolean = integer .
Here transforms it into
("a_boolean_item"='1')
which seems safe in anyway.
<li><b>Add a new option 'pqopt' which specifies libpq connection parameters as a conninfo style string.</b><br /></li>
The string must be enclosed with braces {} e.g. pqopt={sslcert=... sslkey=... sslrootcert=...} in the case
 of connection strings. Though host, port, dbname, user, password, sslmode, keepalives_idle or keepalive_interval
 parameters can be set using this option, they are ordinarily set by other options. When some settings for
 those parameters conflict with other ordinary options, connections are rejected.
<li><b>Fix a corner case when parsing connection strings enclosed with braces.</b><br /></li>
<li><b>As tuple_updated item in AddUpdated(), the parameter should be used. Deriving from other items caused bad results.</b><br /></li>
<li><b>Change the default of ByteaAsLongVarBinary from 0 to 1.</b><br /></li>
</ol><br />
<h2><a id="09.05.0400">psqlODBC 09.05.0400 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Enable COMMLOG and MYLOG button.</b><br /></li>
<li><b>Default of *level of rollback on errors* is default(statement) not transaction.</b><br /></li>
<li><b>Fix the bug SQLGetDescFieldW or SQLColAttributeW mistakenly returns SQL_ERROR.</b><br /></li>
<li><b>Move src/*.exe to exe/*.exe on Windows.</b><br /></li>
Also use fc command instead of diff command on Windows. Fix a compilation error in large-object-data-at-exec-test.c regarding a type declaration in the middle of a code block.<br />
Patch by Michael Paquier.
<li><b>Ignore the difference between CR LF, LF and CR line break when comparing expected and result output.</b><br /></li>
<li><b>Prior to Visual Studio 2015 Update 3, the hook functions of type PfnDliHook __pfnDliNotifyHook2 and __pfnDliFailureHook2 were non-const.</b><br /></li>
They were made const to improve security (global, writable function pointers are bad).  If for backwards compatibility you require the hooks to be writable, define the macro DELAYIMP_INSECURE_WRITABLE_HOOKS prior to including this header and provide your own non-const definition of the hooks.<br />
The following infomation is from Dave Cramer(davecramer@gmail.com).
<li><b>Fix a regression test some failures.</b><br /></li>
</ol><br />

<h2><a id="09.05.0300">psqlODBC 09.05.0300 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Largely reduce overhead of localtime() in SQLFetch</b><br /></li>
localtime() is a very costly system call causing serious grief on
performance of the driver for OLTP-type applications using a lot
SQLFetch and this one is being called for all data types when performing
an in-line conversion, while it is being used only in the case where
some of the date and/or timestamp fields are not initialized. While
testing performance of an internal application, this patch has proved
to improve the overall performance of an application by 20%.

<li><b>Fix the use and the implementation of getNthValid().</b><br /></li>

<li><b>Fix the handling of boundary_should_be_adjusted case when a rowset is cut in the middle of cached rows.
Also fix the row info of SQL_ADDed tuples.</b><br /></li>

<li><b>Estimate the rowsetSize including deleted tuples correctly so that rowset can be effectively handled.</b><br /></li>

<li><b>Set once_reached_eof status when useDeclareFetch=0 so that QR_num_total_read() macro works well.</b><br /></li>
Don't forget to call CC_on_abort_partial() when rollback back to a savepoint.
Now the driver passes cursor-block-delete test.

<li><b>Refine SQLFetchScroll() for the orientations other than SQL_FETCH_NEXT/PRIOR.</b><br /></li>
Discard move_from_the_last stuff and call move_cursor_to_last() instead.

<li><b>Refine cursors with KEYSET using oid or oid alternative as far as possible.</b><br /></li>

<li><b>Preparation for handling inheritance.</b><br /></li>

<li><b>Convert tableoid to relation name in case of inheritance.</b><br /></li>

<li><b>fix buffer overrun in logging, and code cleanup.</b><br /></li>
Patch by Tsunakawa, Takayuki.

<li><b>Implement SQL_QUERY_TIMEOUT.</b><br /></li>
Patch by Tsunakawa, Takayuki.

<li><b>'for' loop initial declarations are only allowed in C99 mode.</b><br /></li>
</ol><br />

<h2><a id="09.05.0210">psqlODBC 09.05.0210 Release</a></h2>
Changes:<br />
<ol type="1">
 <li><b>Makefile.am in order to add new test case and expected output to distribution.</b><br /></li>
 <li><b>Use LoadLibraryEx for gxalib.dll load search path.</b><br /></li>
</ol><br />

<h2><a id="09.05.0200">psqlODBC 09.05.0200 Release</a></h2>
Changes:<br />
<ol type="1">
 <li><b>Clear the parsed result before executing simple query so that SQLRowCount() returns.</b><br /></li>
 This fix the bug reported by Walter Willmertinger.

 <li><b>Fix NULL dereferences which causes application crash.</b><br /></li>
 Patch by Tsunakawa, Takayuki.

 <li><b>Don't initialize next_in_cache or rowstart_in_cache info when scrolling (block) cursors in declare/fetch mode.</b><br /></li>
 This fixes the bug reported by John Kew.

 <li><b>Correct the detection of eof in useDeclare/fetch mode.</b><br /></li>
 This change fixes the bug about fetching prior after scrolling next until eof reported by BenS.

 <li><b>Fix the bug about MONEY type.</b><br /></li>

 <li><b>Consider decimal_digits of SQL_TIME (and time field of PostgreSQL).</b><br /></li>

 <li><b>Don't forget to update num_total_read field of QResultClass record in case 'fetch 0 rows' after 'move'.</b><br /></li>
 This fixes the bug 'When fetching a row "behind" the rowset by "fetch absolute" only the first ones of the result set can be fetched.' reported by Bernhard Goebel.

 <li><b>Make sure that EOF occurs when 'fetched < fetch requested'.</b><br /></li>

 <li><b>Correctly handle SQLGetData() when the target type is SQL_C_WCHAR and the buffer is small to get the whole data for some data types such as bool, date, time ... etc.</b><br /></li>

 <li><b>Refine SQLGetData().</b><br /></li>
 <ol type="a">
 <li>Unify midtemp and moneytemp.<br /></li>
 <li>Variable wconverted is no longer needed.<br /></li>
 <li>Pre_convert for PG_TYPE_BOOL is not needed.<br /></li>
 <li>It's better to take the same road even in case of pre_convet.<br /></li>
 </ol>

 <li><b>Fixed possible once to build test suite in a different place other than the source code is, it's not now.</b><br /></li> 

 <li><b>CHAR causes a compilation error in some environment. Use char instead of CHAR.</b><br /></li>

 <li><b>Correctly judge the SQLSTATE 01S06(Attempt to fetch before the result set returned the first rowset) for SQL_FETCH_PRIOR operations of SQFetchScroll.</b><br /></li>

 <li><b>Checking a flag bit mistakenly resets other flag bits.</b><br /></li> 
 Patch by Tsunakawa, Takayuki.

 <li><b>setup.c:test_connection() calls EN_Constructor() twice, leaking small memory.</b><br /></li>
 Patch by tsunakawa, Takayuki.

 <li><b>The existing memory is not freed upon realloc() failure.</b><br /></li>
 PGAPI_BindCol() doesn't check the failure of extend_getdata_info().<br />
 Patch by Tsunakawa, Takayuki.

 <li><b>The statement linked list is not properly chained, which throws away some statements.</b><br /></li>
 Patch by Tsunakawa, Takayuki.

 <li><b>LINKMT is not used in the build process.</b><br /></li>
 ADDL_INC should be ADD_INC.  Just a typo. The CLEAN target doesn't delete .pdb files.<br />
 Patch by Tsunakawa, Takayuki.

 <li><b>Fix a parameter unmatch of snprintf.</b><br /></li>

 <li><b>In Windows the use of external variables timezone, tzname and daylight are deprecated. Use _timezone, _tzname and _daylight instead.</b><br /></li>

 <li><b>SQLS(G)etDescRecW instead of SQLS(G)etDescRec for Unicode driver.</b><br /></li>

 <li><b>The third stricmp() in writeDriverCommoninfo() is useless, because the second one causes the function to return.</b><br /></li>
 <ol type="a">
 <li>SC_get_errormsg() definition is repeated twice in succession.<br /></li>
 <li>In info.c:SQLGetInfo(), "len = 0" is unnecessary because len is assigned at the end of the function.<br /></li>
 <li>In execute.c:PGAPI_ExecDirect(), flag doesn't need to be set as its value doesn't change.<br /></li>
 <li>PODBC_PER_STATEMENT_ROLLBACK is not used.<br /></li>
 </ol>
 Patch by Tsunakawa, Takayuki.
 </ol><br />

<h2><a id="09.05.0100">psqlODBC 09.05.0100 Release</a></h2>
Changes:<br />
<ol type="1">
  <li><b>Use libpq for all communication with the server</b><br /></li>
  Previously, libpq was only used for authentication. Using it for all
  communication lets us remove a lot of duplicated code. libpq is now
  required for building or using libpq.

  <li><b>Remove support for protocol versions older than 3.</b><br /></li>
  Protocol version 3 was introduced in PostgreSQL 7.4, so this means that we
  no longer support server versions 7.3 or older. This simplified the
  code, making maintenance easier.

  <li><b>Remove support for ODBC versions older than 3.51.</b><br /></li>
  The official binaries have been compiled in 3.51 mode for a very long time,
  so this has no effect on the official binaries.

  <li><b>Avoid one round-trip to the server when establishing connection.</b><br /></li>
  When connecting to a server, the driver used to issue a query to determine
  the client_encoding setting being used, but that was unnecessary because
  all supported server versions send that information as part of the connection
  handshake when a connection is established. Remove the extra query, which
  should make connecting over a high-latency link faster.

  <li><b>Report max length of 'name' fields correctly.</b><br /></li>
  PostgreSQL columns of type 'name', used e.g. in catalog tables to hold
  names of relations and other objects, were reported as having type
  VARCHAR(64). However, the real max length of a name field is only 63 bytes.

  <li><b>Remove 'Optimizer' configuration option</b><br /></li>
  You can use the generic ConnSettings option with value "set geqo=off", to
  disable GEQO.

  <li><b>Fix title in 32-bit Unicode drivers setup dialog</b><br /></li>
  The title on the 32-bit Unicode drivers's setup dialog on Windows
  incorrectly said "ANSI".

  <li><b>Don't export private symbols that are not part of the ODBC interface </b><br /></li>
  This was causing problems when the driver was loaded together with another
  dynamically loaded library with a function of the same name. This was
  reported to happen when loading the odbc_fdw foreign data wrapper into
  a PostgreSQL server, because both the PostgreSQL server and the ODBC driver
  contain a function called check_client_encoding().

  <li><b>Report a sensible SQL_DESC_OCTET_LENGTH value for result set columns of type 'unknown'</b><br /></li>
  If a query returns a column of type 'unknown', as happens e.g. in a query
  like "select 'foobar' from table" where the datatype of the constant
  'foobar' is not specified, the SQL_DESC_OCTET_LENGTH property of the column
  was returned as invalid. Report it the same as 'varchar' field with no
  explicit length, instead.

  <li><b>Fix quoting bugs in sending integer query parameters to server</b><br /></li>
  The drivers used to assume that if a parameter's SQL type is SQL_INTEGER
  or SQL_SMALLINT, the value does not require quoting when its send to the
  server. For example, "SELECT ?", with parameter 123 was translated to
  "SELECT 123", when UseServerSidePrepare was not enabled. However, there
  was no check that the query parameter in fact contained a valid integer,
  when replacing the parameter markers with their values. Also, in a query
  like "SELECT 0-?", a negative value needs to have parens around it, as in
  "SELECT 0-(-123)".

  <li><b>Don't reset autocommit when a connection is established</b><br /></li>
  If autocommit is disabled on a connection, by calling
  SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, 0), before
  connecting with SQLDriverConnect(), autocommit was incorrectly reset back
  to on when the connection was established.

  <li><b>Send datatype information for query parameters, when known</b><br /></li>
  If a query parameter is bound with a specific SQL type, pass on that
  information to the server. This makes the behaviour of queries like
  "SELECT '555' &gt; ?" more sensible, where the result depends on whether the query parameter
  is interpreted as an integer or a string.

  <li><b>Use libpq defaults for Server, Username and Database settings</b><br /></li>
  Server, Username and Database settings can now be left empty, in which case
  the corresponding libpq defaults will be used. The libpq default is
  to connect to a local server over Unix domain sockets (on Unix systems)
  or to localhost over TCP/IP (on Windows), if Server is left empty. The
  default username is the current operating system user, and the database to
  connect to is a database with the same name as the user. These built-in
  defaults can be changed by environment variables, however.

  This is particularly useful for connecting to a local installation via Unix
  domain sockets, as that is the default when Server is left empty, and was
  difficult to configure otherwise.

  <li><b>Fix bug in parsing E'' literals</b><br /></li>
  The driver needs to parse a query string to determine whether a '?'
  character is a parameter marker, or if it's inside a quoted string or a
  SQL comment. This parsing did not correctly handle E''-style strings.

  <li><b>Remove 256 byte limit on the length of NOTICE messages</b><br /></li>
  There was a built-in limit of 256 bytes on the length of NOTICE messages
  received from the server. Strings larger than 256 bytes were not returned
  to the application. That limit has been removed.

  <li><b>Fix parsing of strings containing escaped quotes with Parse=1</b><br /></li>
  This fixes issues in extracting metadata like result set column names, with the Parse=1 option.

  <li><b>Fix connecting with a user or database name that contains spaces or quotes </b><br/></li>
  User and database names were not quoted correctly when building a connection
  string. A different method is now used for sending those parameters, which
  doesn't require quoting and escaping.

  <li><b>Remove support for so-called "premature execution"</b><br/></li>
  Premature execution was a method for getting information about a result set
  of a query, before SQLExecute() was called. That was always dangerous, as
  any side-effects of the query would happen, even if the application did
  not call SQLExecute() after all. With protocol version 3, there is a safer
  way to do this. This also removes the DisallowPremature configuration
  option, as the driver never does premature execution anymore.

  <li><b>Fix buffer overrun when the server reports an error message longer than 4096 bytes</b><br/></li>
  If the server returned an error longer than 4096 bytes, we would overrun
  the buffer by two bytes. If you're unlucky, that could lead to a crash.
  That consistently happened on Windows.

  <li><b>Improve parsing of INSERT INTO statements, for @@identity support</b><br/></li>
  The code that parses INSERT INTO statements, to extract the name of the
  target table, got confused by values containing dots, and other things.
  Improve the parsing support to handle a wider range of INSERT statements.

  <li><b>Fix crash in SQLTables() function, if search_path was set to a non-existent schema</b><br/></li>
  The server-side current_schema() function returns a NULL if search_path is
  set to a non-existent schema, and the driver code was not prepared for a
  NULL result.

  <li><b>Fix buffer overrun when connecting, and KeepaliveTime and KeepaliveInterval were both set</b><br/></li>

   If the server returned an error longer than 4096 bytes, we would overrun
   the buffer by two bytes. If you're unlucky, that could lead to a crash,
   and it consistently did on Windows.
   Per report from Andrus Moor.<br />

  <li><b>Set an error message when password is required to connect.</b><br/></li>
   In previous versions, if a connection fails because the server requires a
   password and no password was supplied.
   Per report from "PSequel Support".<br />

   <li><b>Improve parsing of INSERT INTO statements to support @@identity</b><br/></li>
    Patch by Christian Ullrich.<br />

   <li><b>Fix SQL_DATA_AT_EXEC processing for large objects.</b><br/></li>
   Reported by Vadym Krevs.<br />

  <li><b>The server decide if SQL_LONGVARBINARY means a bytea or large object.</b><br/></li>
   This reverts the behaviour of SQL_LONGVARBINARY parameters.<br />

   <li><b>Fix handling of return value in {? = CALL ... } syntax.</b><br/></li>

   When sending the query to the server, need to use the number of parameters
   calculated by build_libpq_bind_params(), which excludes the OUT parameter,
   rather than the original number of parameters.
   Reported by Haribabu Kommi.<br />

</ol><br />


<h2><a id="09.03.0400">psqlODBC 09.03.0400 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Rip out broken retry/timeout logic in SOCK_wait_for_ready.</b><br /></li>
At a quick glance, the logic looked like retry with progressive timeout, but it was horribly broken. 
First of all, the timeout was only used if retry_count was passed as 0. And in that case, the timeout was 0. 
So retry_count == 0 actually meant "check if data can be read/written without blocking", while retry_count > 0 meant "sleep until data is available".
There was also some code to handle retry_count < 0, but that was dead code because none of the callers passed a negative value.
The hardcoded max. retry count of 30 retries was quite bogus too.
Filling the output buffer more 30 times is not necessary an error, and it's not clear that the ssl library could not return SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE more than 30 times.
Unlikely, yes, but possible. So, just rip out the retry_count and progressive timeout logic. Replace
the retry_count argument with a simple "should block?" argument. I didn't dare to remove the condition that we always wait if SSL is enabled, although
I don't understand that at all. But perhaps there's some well-hidden reason for that.
Per report from Prakash Itnal, although this just removes the broken code, and won't enable the kind of a timeout that he wanted.
<li><b>Clean up Windows makefiles.</b><br /></li>
Get rid of the CPU and CPUTYPE variables in win64.mak. Instead, assume that the TARGET_CPU variable has been set correctly in the environment.
TARGET_CPU is set by "setenv" script that comes with the Microsoft Visual Studio C compiler package.
It never worked to pass a "CPU=x86" and using a x64 compiler, for example, so seems better to determine the correct target
from the environment, than fail with a cryptic error message if the CPU argument and the environment don't match.
To build 32-bit binaries with win64.mak, simply do "setenv /x86" before running "nmake -f win64.mak".
Similarly, to build 64-bit binaries, use "setenv /x64".
It should now be possible to build both 32-bit and 64-bit binaries with win64.mak. 
Ideally, we could now remove win32.mak altogether, but there are small differences between win64.mak and win32.mak in the build options that
they use. I don't understand the differences enough to dare to remove win32.mak yet.
The CPU=AMD64 alias for x64 is no longer supported (as the whole parameter is now gone).
Also do whitespace & other cosmetic fixes to win32.mak and win64, to make them more similar. 
This helps when comparing the two with "diff".
Remove remains of the long-gone "MULTIBYTE" setting (it was misspelled in win64.mak, anyway)
<li><b>Fix crash if connection is closed while sending a query to the server.</b><br /></li>
Some functions reset conn->sock to NULL on a socket error, so we must not keep a copy of it in a local variable. 
Also, SOCK_get_id should check for NULL argument like all the rest of the SOCK_get/put_* functions.
<li><b>Rewrite the conversion functions between strings and SQL_NUMERIC_STRUCT.</b><br /></li>
Aside from making the functions more readable and faster, this fixes a number of bugs:
<ol type="a">
<li>When converting a large number from decimal to binary, the least significant byte might be wrong.<br />
reported by Walter Couto.</li>
<li>In binary->decimal conversion, a number with small precision but large scale caused a "Floating point exception".<br /></li>
<li>In binary->decimal conversion, building the final string was wrong, picking
up "digits" from outside the reserved stack space, if scale was larger than 40<br /></li>
<li>The param_string buffer allocated for the result of binary->decimal conversion was too small.<br /></li>
</ol>
Also add a test cases for all of these bugs.
<li><b>Fix ODBC function escape for SPACE function.</b><br /></li>
<li><b>Make sure that the psqlodbc ANSI driver is ODBC3.5.</b><br /></li>
<li><b>Register 64bit XA DLL on installation</b><br /></li>
Changes by a patch from Craig Ringer 
<li><b>Fix potentially uninitialized local pointer access which causes.</b><br /></li>
fatal compilation errors on vs2012/2013 reported by Craig Ringer.
<li><b>Fixed ctype_length() is missing the length for SQL_C_BIGINT and SQL_C_NUMERIC.</b><br /></li>
patch by John Smith.
<li><b>Fix access to unallocated memory in IAsyncPG.</b><br /></li>
IAsyncPG was deleting its self, then returning an instance variable by value. 
This is probably going to be safe pretty much all the time,
but it's still a memory error, and DrMemory (a Windows valgrind-alike)
<li><b>SQL_NUMERIC_STRUCT was not available until ODBC 3.0.</b><br /></li>
Also add a prototype for ResolveNumericParam for readability.
<li><b>Increase digits used to convert from REAL/DOUBLEs to strings so that the reverse conversions can recover original values.</b><br /></li> 
Patch originally by John Smith.
<li><b>Clear errors for prepared statement for subsequent exections.</b><br /></li>
<li><b>Fix the problems using SQLFetch on prepared INSERT with RETURNING clause.</b><br /></li>
reported by John Smith.
<li><b>Fix use of server-queried version before connection.</b><br /></li>
psqlODBC attempted to use the version that's queried from the server before it was obtained from the server during the connection setup. Because the server
version is initialized to 0.0, tests for "server version >= 7.4" or "server version >= 6.4" using the PG_VERSION_LT macro were always returning false.
Instead, use PROTOCOL_64 and PROTOCOL_74 tests against conninfo. These don't offer any "greater than" form, so just test both. There's little point adding
anything prettier when it can all be removed when v1/v2 protocol support is removed soon anyway.
The main symptom of this issue was that psqlODBC was sending an invalid protocol message for the v3 protocol, "Q \0", causing the server to wait for
the second half of the length word forever. At connection close, the server
would emit:
<br />
&nbsp; unexpected EOF within message length word
<br />
This issue was observed while tracking down problems with XA transactions in MSDTC failing to commit after a successful prepare because an isolated tx 
created via getLockedXAConn() got stuck here, but is not confined to that problem.
<li><b>Don't use PG_VERSION_xx() macros in original_CC_connect().</b><br /></li>
it's not obtained from the server yet. This may fix another cause of the problem Craig Ringer reported.
<li><b>Fix bug in SQLCancel().</b><br /></li>
If one thread was busy executing a savepoint statement, while another thread calls SQLCancel() on the statement, SQLCancel() would try to release the
locks held by the other thread. That's extremely racy; if the other thread tries to increment/decrement the lock_CC_for_rb counter at the same time,
we could end up releasing the lock to many times or too few times. Also, releasing a pthread mutex from a different thread than the one who acquired
it is undefined behavior.
AFAICS the DiscardStatementSvp() call in SQLCancel() can be safely removed.
It's outright wrong and dangerous if the statement is busy executing in a different thread, and the other codepaths in PGAPI_Cancel() already call
DiscardStatementSvp().
Bug report by Jade Koskela.
<li><b>Fixes a NULL pointer dereference occurring when connecting.</b><br /></li>
using SSPI authentication (without kerberos, a local Windows user trying to connect to postgres instance on same host). 
Patch originally by Nikhil R Deshpande.
<li><b>Fix bug with UseDeclareFetch=1 when a transaction is committed before fetch.</b><br /></li>
If a server cursor is closed before the application has fetched any rows from the result set, the "base" of the result set's cached rowset was off-by-one.
Also add a regression test for the same. This fixes the bug reported by Jan-Peter Seifert.
<li><b>Fix driver name mismatch between 32-bit ODBC app and 64-bit MSDTC host.</b><br /></li>
If the 32-bit driver runs on a 64-bit host within a 32-bit app running under SysWow64 then XA transactions will fail to recover.
That's because recovery is done by pgxalib.dll which runs with in MSDTC.exe - a 64-bit application. 
It connects to a DSN supplied by psqlODBC in EnlistInDtc_1pipe during DTC enlistment by the XA resource manager. 
This DSN uses the driver name of the client's ODBC driver - which is fine so long as the client and MSDTC architectures match. 
If they don't then MSDTC will fail to connect to Pg, so it'll never resolve transactions.
Traces of MSDTC will show RM_COMMIT_DELIVERY_FAILED_DUE_TO_CONNECTION_DOWN events.
Traces of pgxalib.dll will show xa_recover(..) being entered, followed by "SQLDriverConnect return=-1".
<li><b>Remove PgDtc_set_property(.., prepareRequestded, 0) which causes a crash in case PREPARE TRANSACTION error.</b><br /></li>
The property prepareRequested isn't set anywhere.
<li><b>Add KeepaliveTime and KeepaliveInterval options to specify time or interval for keepalive.</b><br /></li>
<li><b>Fix a memory leak check qresult.</b><br /></li>
Per report by Pluto Cobain.
<li><b>Get rid of copy and paste code in installer/ and unify them.</b><br /></li>
The powershell scripts had lots of duplication. Make the unified code instead.
Original patch was provided by Craig Ringer.
<li><b>Clear unused stuff from PgDtc_isolate() function.</b><br /></li>
Also add CC_initialize_pg_version() call after CC_copy_conninfo() so as to avoid the trouble caused by early PG_VERSION_xx() calls.
<li><b>Fix race condition in getting the current decimal separator.</b><br /></li>
The code to get the current decimal separator was not thread-safe. If two threads concurrently saw that the locale had changed, they might both try
to free() the same string.
This isn't a perfect fix, there's still a race condition if a thread changes the locale while another thread is running the psqlodbc code. But at least
this eliminates the race condition when the locale was changed earlier, not concurrently, and even if it is changed concurrently, this is less likely
to crash, depending on the way localeconv() is implemented in libc.
<li><b>Fix bug in building an abbreviated connection string.</b><br /></li>
Introduced by the keepalive-patch, which accidentally removed a line from sprintf format string. Caught by a compiler warning.
<li><b>Fix buffer overflow in SQLGetData.</b><br /></li>
If a PostgreSQL timestamp column is fetched using SQLGetData, into a SQL_C_CHAR output variable, with size of 20-22 bytes, the driver might
overrun the buffer by a few bytes with unusual timestamp values, with year < 0 or > 10000.
While at it, fix the truncation behavior for date/time/timestamp values so that if the output buffer is too small, we still write what fits and
truncate, instead of writing nothing. This is something that one might do on purpose, e.g. if you only want to fetch the year part of a date,
you might call SQLGetData() on a date column, with only 4 bytes long output buffer. (although we haven't heard any complaints from the field).
Also, if the output buffer is of type SQL_C_WCHAR, but the buffer length is odd, and we have to truncate, we didn't NULL-terminate the string.
Using an odd-sized buffer with SQL_C_WCHAR is a pretty unlikely thing to do, but nevertheless I think this is more correct behavior.
<li><b>The function SC_setInsertedTable() prepares an info for subsequent 'select @@IDENTITY' command.</b><br /></li>
Take table name like catalog.schema.table into account in the function.
Fix the bug reported by Phillippe Champignon.
<li><b>Improve pgxalib.dll(MSDTC support).</b><br /></li>
<ol type="a">
<li>Add an option which lets xa_open() try to connect to the database immediately.
This would cause an error at enlistment in dtc when the authentication method depends not only on the db user but also
on the OS user, which means the automatic transaction recovery is unavailable.<br /></li>
<li>Log the error message in case of SQLDriverConnect() error.<br /></li>
<li>Improve the logging.<br /></li>
</ol>
<li><b>Fix the regkey search bug when XARMcreate() causes an error at enlistmentvin DTC.</b><br /></li>
<li><b>Additonal improvement on MSDTC enlistment.</b><br /></li>
Unfortunately the current pgxalib.dll can't recover transactions which use sslmode verify-[ca|full] or whose authentication is SSPI, certificate or ident.
When MSDTC.exe tries to connect to PostgreSQL it does so under Windows user NETWORKSERVICE, which won't match the username the original user connected
to PostgreSQL as. So PostgreSQL will reject the connection.
<li><b>Fix SQLTables column names to be ODBC version 3 compliant.</b><br /></li>
In ODBC3, TABLE_QUALIFIER was renamed to TABLE_CAT, and TABLE_OWNER to TABLE_SCHEM.
Per report David Hedberg.
<li><b>Add a new dialog page to the setup program and allow the setting of PREFERLIBPQ and XAOPT option.</b><br /></li>
<li><b>Add a powershell script buildBootStrapper.ps1 which builds bootStrapper program with some optional parameters.</b><br /></li>
Quote the version number of bootstrapper from the configuration xml file unless specified. 
Also change the name of 32bit MSI in the bootstrapper according to changes of 32bit installer build system.
Change buildInstallers.ps1 build the bootstrapper together.
Change ALLUSERS from "2" to "1" of the 64bit installer.
</ol><br />
<h2><a id="09.03.0300">psqlODBC 09.03.0300 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>Fix implicit casts between SQLCHAR and char. Don't rely on -Wno-pointer-sign.</b><br /></li>
<li><b>Pass the argument to isalpha/isspace etc. routines as unsigned char.</b><br /></li>
Per the C standard, the routine should be passed an int, with a value that's representable as an unsigned char or EOF.
 Passing a signed char is wrong, because a negative value is not representable as an unsigned char.
 Unfortunately no compiler warns about that.<br />
<li><b>Use "function(void)" instead of "function()" to declare 0-arg functions.</b><br /></li>
"function(void)" is the correct syntax in a function declaration, although in practice compilers accept the latter too. It's OK in a function definition, but change those too for consistency.
 This fixed by Michael Paquier.<br />
<li><b>Add missing function declarations.</b><br /></li>
These are not actually used outside of pgtypes.c, but let's be consistent and declare them in pgtypes.h
 This fixed by Michael Paquier.<br />
<li><b>Use the PG_CONFIG setting from ./configure cmd line in regression tests.</b><br /></li>
If compiling without libpq (configure --without-libpq), then you still need to have pg_config in path to build the regression tests, or specify
 PG_CONFIG at the make command line.<br />
<li><b>Add more test cases.</b><br /></li>
Add a new test case to test ODBC functions deprecated in ODBC 3.0, ODBC catalog functions, SQLGetConnectOption and Avoid deprecated SQLAllocStmt/SQLFreeStmt in regression tests. and more.
Per Michael Paquier<br />
<li><b>Don't clear error number when SQLGetDiagRec is called.</b><br /></li>
Calls to SQLGetDiagRec are supposed to be nondestructive, per ODBC spec. Also add a test case for that.<br />
<li><b>Fix two UseDeclareFetch bugs.</b><br /></li>
<ol type="a">
<li>NOTICE messages were not delivered to the application, if they arrived as response to the DECLARE CURSOR statement.</li>
<li>Array-bound parameters on SELECT-queries caused a "cursor already open"
 error.</li>
</ol>
 These bugs were found by running the regression suite with
 UseDeclareFetch=1. It's now clean.<br />
<li><b>Fix crash if connection is closed during CC_send_query_append function.</b><br /></li>
 This fixed Malcolm MacLeod<br />
</ol><br />
<h2><a id="09.03.0210">psqlODBC 09.03.0210 Release</a></h2>
Changes:<br />
<ol type="1">
<li><b>SSL verify[-(ca|full)] is avaiable since 8.4.</b><br /></li>
There seems no need to check it. Also there's no need to call lt_dlopen currentl
y.<br />
<li><b>Update EXTRA_DIST in Makefile.am</b><br /></li>
Files for the new lfconversion test case were missing.<br />
<li><b>Fix locking in SC_set_prepared</b><br /></li>
added ENTER/LEAVE_CRIT_CS calls in SC_set_prepared.<br />
<li><b>Add test case for CTE queries (WITH ...)</b><br /></li>
None of the existing test cases covered that. This test case gives a different e
rror message than the original one, but it'sthe same underlying issue.<br />
<li><b>Silence compiler warning.</b><br /></li>
SQLGUID format and conn_settings cannot be NULL.<br />
This fixed by Michael Paquier.<br />
<li><b>Fixed POSTGRES_RESOURCE_VERSION variable.</b><br /></li>
Pass the content of POSTGRES_RESOURCE_VERSION variable to the resource compiler
correctly so that FileVersion and ProductVersion are properly set.<br />
<li><b>Change regression test positioned-update</b><br /></li>
Use "exit(1);" instead of "return;" to exit from main().<br />
This fixed by Michael Paquier, at least some compiler on OS X didn't like it.<br />
</ol><br />
<h2><a id="09.03.0200">psqlODBC 09.03.0200</a></h2>
Changes:<br />
<ol type="1">
<li><b>Set TCP keepalive by default.</b><br /></li>
<li><b>Fix cursors test case on big-endian systems.</b><br /></li>
The SQL_CURSOR_COMMIT_BEHAVIOR property is a SQLUSMALLINT, not SQLUINTEGER.
On a little-endian system, you wouldn't notice, provided that the target variable was initialized to 0 before the SQLGetInfo call. <br />
Per report from Christoph Berg that the cursors test was failing on mipsel and other big-endian architectures.</b><br />
<li><b>Add regression test for SQLBindCol.</b><br /></li>
We were already doing SQLBindCol as part of the positioned-update test, but seems good to have one explicitly for it.<br />
<li><b>The driver takes SQL_C_LONG to mean SQLINTEGER rather than "long".</b><br /></li>
The regression test was failing on the s390x architecture because of that.<br />
It's big-endian, with sizeof(long) == 8.<br />
<li><b>Revert "When LF->CR+LF conversion causes an buffer truncation, supress the conversion (in case of unicode)."</b><br /></li>
<li><b>Refactor utf8_to_ucs_lf.</b><br /></li>
A macro is difficult to debug, so turn it into a regular function.<br />
Also, add a new test case for LF->CR+LF conversion, to test the bug that Nils Go"sche reported (which was already fixed).<br />
<li><b>Add locking to SQLFreeStmt and SQLFreeHandle.</b><br /></li>
This fixes a race condition, where SQLFreeStmt is called while the connection is busy executing another statement. <br />
SC_set_prepared would see that the connection is busy (CONN_EXECUTING), and not issue a DEALLOCATE statement to free the prepared statement in the backend, leaking it.<br />
<li><b>The 2dn argument of SC_set_prepared() is int(enum) not BOOL.</b><br /></li>
<li><b>Change to supply non-NULL parameters for SC_set_error().</b><br /></li>
</ol><br />
<h2><a id="09.03.0100">psqlODBC 09.03.0100</a></h2>
Changes:<br />
<ol type="1">
<li><b> Fix uninitialized use of 'allocbuf' variable, in case of out-of-memory.</b><br /></li>
Compiler warned about this. If ENLARGE_NEWSTATEMENT macro ran out of memory, it would jump to cleanup routine. <br />
The cleanup would check if allocbuf isNULL, and try to free() it if not. <br />
allocbuf needs to be initialized to NULL before the first ENLARGE_NEWSTATEMENT macro invocation.<br />
<li><b> SQL_C_SLONG stands for SQLINTEGER not long.</b><br /></li>
<li><b> Change SQL_ATTR_PARAMS_PROCESSED_PTR attribute which is set by SQLSetStmtAttr() from (SQLUINTEGER *) to (SQLULEN *).</b><br /></li>
This fixes the bug reported by Christopf Berg. <br />
Also verify similar attributes which were changed from SQL(U)INTEGER (*) to SQL(U)LEN (*) when 64bit ODBC was introduced.<br />
<li><b> Reduce the memory usage of ConnectinClass objects by changing their large fixed length text fields to variable ones.</b><br /></li>
Because changes are applied to percent-encoded fields this time, password field is also a target of this.<br />
<li><b> Revise MSDTC support.</b><br /></li>
  Remove pointlessly complicated AsyncThreads stuff. Instead use _beginthread() to clean up threads.<br />
  Make pgenlist.dll from the structure change of ConnectionClass.<br />
    The driver dlls exports the functions described in connexp.h which are used by pgenlist.dll.<br />
  Isolate the current communication path if necessary.<br />
    While an IAsyncPG object is alive, a ConnectionClass object (hereinafter refered to as conn-obj) is assigned to it. <br />
    The assignment has to be changed in the following cases.<br />
<ol  type="a">
<li> SQLDisconnect() is called for the current connection handle which is assigned to an IAsyncPG object.</li>
	Allocate another conn-obj and move the current communication path (*sock* member of the current conn-obj) to the new conn-obj.
	The communicaation path is lost from the current conn-obj and the new conn-obj is assigned to the IAsyncPG object.<br />
<li> Another (global) transaction is about to begin but the current global transaction is not PREPARED yet.</li>
	Same as case a) but will open a new communication path for the current conn-obj for the subsequent ODBC API calls.<br />
<li> Another (global) transaction is about to begin and the current global transaction is already PREPARED.</li>
	Allocate another conn-obj and open a new communication path for the conn-obj.
        The new conn-obj is assigned to the IAsyncPG object only to issue COMMIT/ROLLBACK PREPARED command.
   communication pass (*sock* member of the current ConnectionClass object) to the new object and change the state of the current object NOT CONNECTED.
   The IAsyncPG object uses new object instead of the current object. In case b) the current object will open a new communication path.<br />
</ol>
</li>
<li><b> Ignore automatically-generated files in source code with .gitignore.</b><br/ ></li>
 This is useful to prevent accidental commit of files that are not wanted in the remote repository.<br />
 The original patch was provided by MichaelPaquier. I also added files genearated by VC build tools or WIX tools to .gitignore.<br />
<li><b> The first cut of psqlodbc setup project. It builds a setup program which can't be done by a single MSI. </b><br /></li>
 It would install VC++ redistributable, 32 bit psqlodbc driver and 64 bit psqlodbc driver (on 64 bit windows).</b><br /></li>
<li><b>Change the configure.ac </b><br /></li>
<ol type="a">
<li>Change checking SIZEOF_LONG not SIZEOF_LONG_INT.</li>
<li>with_xxxxx (xxxxx is the package name) variables directly instead of the withval variable.</li>
<li>Improve the help message of configure script.</li>
<li>Stop linking lib(i)odbc library because the library is unnecessary and rather harmful. </li>
Per report from Pavel Raiskup(postgresql.org/message-id/1769926.65KUyECjFr@nb.usersys.redhat.com).<br />
<li>Move -Wall -Wno-pointer-sign CFLAGS option specified in Makefile.am to configure.ac. </li>
<li>ODBC_CONFIG is set when neither unixODBC nor iODBC is explicitly specified.</li>
</ol>

<li><b> Silence misc compiler warnings. Also a few comment typo and whitespace fixes.</b><br /></li>
<li><b> CC_Copy is needed if _HANDLE_ENLIST_IN_DTC_ is used, regardless of CLEANUP_CONN_BEFORE_ISOLATION.</b><br /></li>
 That caused compilation on Windows to fail.<br />
<li><b> Remove some dead code.(SOCK_clear_error, SOCK_skip_n_bytes)</b><br /></li>
<li><b> Handle turning standard_conforming_strings to off in mid-session.</b><br /></li>
 We already watched for a ParameterStatus response indicating that standard_conforming_strings was turned on, and acted accordingly, but if it was turned off, we did nothing.<br />
<li><b> Remove common.o on "make clean"</b><br /></li>
<li><b> Change the default for UseServerSidePrepare to 1.</b><br /></li>
 The docs have recommended UseServerSidePrepare=1 for server versions 7.4 onwards, so it seems prudent to change the default so that people don't needto remember to specify it manually.<br />
 With UseServerSidePrepare=1, the "insertreturning" regression test case behaves better, ie.<br />
 SQLNumResultCols() correctly returns the number of columns for an INSERT RETURNING statement, even when called before SQLExecute(). <br />
<li><b> Remove useless 'sync' parameter from prepareParameters() function. It was always passed as TRUE.</b><br /></li>
<li><b> Don't issue a BEGIN when running VACUUM in auto-commit mode.</b><br /></li>
Normally in auto-commit mode the driver begins a new transaction implicitly at the first statement, by sending a BEGIN statement. However,
some commands, like VACUUM, cannot be run in a transaction block, and you will get an error like "VACUUM cannot run inside a transaction block" from
the server. In UseServerSidePrepare=0 mode, the code looks at the first word of the query to determine if the statement is one of the special ones, and
if so, didn't begin a new transaction even when auto-commit mode is disabled. However, in UseServerSidePrepare=1 mode, when using SQLPrepare/
SQLExecute to run the VACUUM, that check was not made. Fix that.
There was one more related inconsistency between UseServerSidePrepare modes. Without server-side-prepares, if you issued an explicit BEGIN in auto-commit
mode, the implicit BEGIN was ont sent. But without server-side prepares, it was. It seems best to send the implicit BEGIN in both cases, because then
you get a warning from the backend about the second BEGIN. That's a good thing, because a sane ODBC application should be using the ODBC function
SQLEndTran() for transaction control, not explicit BEGIN/COMMIT.<br />
<li><b> When LF->CR+LF conversion causes an buffer truncation, supress the conversion (in case of unicode).</b><br /></li>
<li><b> Handle SSL client certificate authentication in Windows Schannel security support provider.</b><br /></li>
You have to place the certificate file postgresql.pfx (PFX or PKCS12 format)
 in %APPDATA%\postgresql folder instead of postgresql.crt and postgresql.key
(I wasn't able to find the way to handle PEM format using Cryptography API unfortunately).<br />
You can create the file using the following command.<br />
<em>openssl pkcs12 -export -in postgresql.crt -inkey postgresql.key -out postgresql.pfx (with empty password).</em><br />
<li><b> Change Windows installer build system for the next release.</b><br /></li>
Change to specify ProductCode for each version so as not to forget to change ProductCode in case of major version up.
Remove VC runtime merge modules from the installer(runtime dlls will be installed via psqlodbc setup program).<br />
[64bit version only] Use libpq by default Remove GSSAPI support by default<br />
<li><b>Concentrate the settings of Windows build system to an xml file and build binaries or installers with reference to it.</b><br /></li>
(configuration.xml) xml file to specify the setting of the build environment.
It is automatically generated in winbuild folder as a copy of winbuild/configuration_template.xml
 when you invoke editConfiguration script firstly.<br />
<em>.winbuild/configuration.ps1</em>	modules to handle the configuration file<br />
<em>.winbuild/editConfiguration.ps1</em>	edit configuration file (GUI)<br />
<em>.winbuild/editConfiguration.bat</em>	same as above with a minimized console window<br />
<em>.buildx86.ps1</em>			build 32bit binary<br />
<em>.buildx64.ps1</em>			build 64bit binary<br />
<em>.installer/buildx86-installer.ps1</em>	build 32bit installer<br />
<em>.installer/buildx64-installer.ps1</em>	build 64bit installer<br />
<li><b> handle private keys of PEM form using CryptoAPI.</b><br /></li>
Certificates of PFX form are no longer needed for SSL client certificate authntication.<br />
<li><b>Fix a bug in CC_copy_conninfo() that free()s password item of input source unexpectedly.</b><br /></li>
Change CC_copy_conninfo() and copy_globals() so that they copy each item one by one.<br />
<li><b>Fix the newly-introduced CORR_STRCPY and CORR_VALCPY macros.</b><br /></li>
They were broken, did not compile. This fixed by Michael Paquier.<br />
<li><b>Add support for verify-ca/full sslmode using Windows Schannel Security Service Provider.</b><br /></li>
Root CAs must be installed into Windows Root certificate store beforehand.<br />
<li><b> VOID is not defined on all systems. Use void insted.</b><br /></li>
This fixed by Christoph Berg.<br />
<li><b> winres.h instead of afxres.h.</b><br /></li>
There are some cases (VS 2012 express etc) when afxres.h doesn't exist.<br />
<li><b> Avoid double-free() bug.</b><br /></li>
Spotted by Fortify static analysis tool.<br />
<li><b> Escape double-quotes in table name correctly.</b><br /></li>
When constructing the select/update/delete for current row in a rowset,
and the schema or table name contained double-quotes, they were not correctly escaped in the constructed SQL statement.
 That lead to errors when doing positioned updates. Also, use snprintf and snprintf_add instead of sprintf and strcat in more
 places. Makes these things look less like buffer overflows to static analysis tools, and make for more readable code anyway.<br />
<li><b> Construct ctid string correctly for block no > 2^31.</b><br /></li>
Block number is unsigned. Other places where we construct ctid strings we got this right, but not this one.
 I'm not sure how to trigger this codepath,
but I'm sure something funny would happen if you tried to use these functions on large enough tables (> 16 TB).<br />
<li><b> Fix buffer overflow in interval parsing.</b><br /></li>
Flagged by Fortify static analysis tool.<br />
<li><b> Check return value of stdup() for out-of-memory.</b><br /></li>
There are a lot of little bugs like this throughout the code, but it's start...<br />
<li><b> Replace calls to my_strcat and my_strcat with snprintf_add.</b><br /></li>
my_strcat didn't check for buffer overflow, which Fortify static analysis tool flagged as an issue. <br />
<li><b> Fix buffer overflow in handling of SQLTables params.</b><br /></li>
<li><b> Use snprintf() instead of sprintf() for safety.</b><br /></li>
I believe these instances were in fact safe, because a cursor name has a maximum length.<br />
<li><b> bufferoverflowu.lib seems no longer needed in recent versions of VC environment.</b><br /></li>
removed it from win64.mak. Speocify CUSTOMLINKLIBS=bufferoverflowu.lib from the command line when it is neccessary in old VC environment.<br />
<li><b> Fix memset() call, meant to clear the whole struct.</b><br /></li>
Per compiler warning.(psqlodbc.c)<br />
<li><b> socket: speedup also ipv6 connection</b><br /></li>
Call getaddrinfo() with AI_NUMERICHOST if it is ipv4/ipv6 address.
For that reason the inet_pton() is better than inet_addr().<br />
This fixed by Pavel Raiskup<br />
<li><b>Call getaddrinfo() with AI_NUMERICSERV because the service is a port number.</b><br /></li>
<li><b>Fixed lost mylog.h in Makefile.am.</b><br /></li>
This fixed by Pavel Raiskup<br />
</ol>
<br />
<h2><a id="09.02.0100">psqlODBC 09.02.0100</a></h2>
Changes:<br />
1.) Protect shared connection list when making cleanup tasks in EN_Destructor
using the patch provided by Michael Kocherov.<br />
2.) Fix a lot of compiler warnings. Most of them were harmless, but some pointed
    to real, but rare, bugs.<br />
3.) Check SIZEOF_LONG_INT, rather than SIZEOF_VOID_P, when deciding whether
    SQLROWSETSIZE exists. That's consistent with unixodbc's sqltypes.h.<br />
4.) Check BUILD_LEGACY_64_BIT_MODE instead of BUILD_REAL_64_BIT_MODE. This
    makes us choose correctly whether we're building a 32-bit or 64-bit version,
    when building with unixODBC version 2.2.13 or higher.<br />
5.) Fix handling of some out-of-memory situations.<br />
6.) Eliminate recursion when freeing result sets of queries with
    array-bound parameters. This avoids running out of stack space on
    SQLFreeHandle, and speeds it up considerably.<br />
7.) Fix memory leak, e.g when SQLNumResultCols is called on a non-SELECT query.
    This was caused by unintentional multiple evaluation of macro arguments.<br />
8.) Move psqlodbc website's main page, FAQ, and howto pages to a separate git
    repository. They are no longer included in psqldbc release tarballs.<br />
9.) Fix bug with binding a 5-bytes long string as VARCHAR parameter, with
    UseServerSidePrepare=0 and BoolsAsChar=1. That combination produced an
    extra empty result set on execution.<br />
10.) Make the MSI build process of 32bit drivers available in 64bit.<br />
11.) Fix bug with DeUseDeclareFetch=1 and UseServerSidePrepare=1, issue COMMIT commands properly in case of AUTOCOMMIT on mode. per reported by Jack Wilson(ljwilson@digitalav.com).<br />
12.) Don't #include errno.h on Windows. VC10 or later intentionally changed the values of error numbers like EINTR, EWOULDBLOCK.<br />
13.) Allow special characters in the password value of a connection string by enclosing the value by braces({}).<br />
14.) Fixed conflict between winsock2.h and winsock.h in socket.c.<br />
15.)Apply blank date <-> null conversion functionality to timestamp type as well.<br />
16.) Fix the *cursor XXXXXXXX already exists* error when handling *with cte* statements reported by Joe Conway.<br />
17.) Fixed the problem *Segmentation Fault in Postgres server when using psqlODBC* reported by Joshua Berry.<br />
18.) Fixed the problem *UseDeclareFetch=1, Fetch=100, UseServerSidePrepare=1 causes Windows client to intermittently hang* reported by Jack Wilson.<br />
<br />
<h2><a id="09.01.0200">psqlODBC 09.01.0200</a></h2>
Changes:<br />
1.) Use int instead of size_t when condition >=0 is used.<br />
2.) Add a necessary break in a switch statement etc.<br />
3.) Fix missing constant(SQL_ATTR_PGOPT_FETCH).<br />
4.) Fix a bug about reference count handling for columns info (Bug report by B.Goebel).<br />
5.) Improve the handling of ARRAY type.<br />
6.) Fix a compilation error etc when MULTITHREAD support is disabled.<br />
7.) Don't discard the result of unnamed statements for later SQLDescribeCol or SQLColAttribute calls.(Bug report by Alexandre).<br />
8.) Set rowstart_in_cache properly when closing eof cursors.(Bug report by Alexandre).<br />
9.) Remove columns info of dropped tables ASAP.<br />
10.) Fix the bug which causes a segfault in SQLSpecialColumns when table name is null string (bug report by Terrence Enger).<br />
11.) Fix the bug that when the show OID column option is enabled, SQLColumns() returns "oid" column info even when the column name parameter which is different from "oid" is specified (bug report from Seifert, Jan-Peter).<br />
12.) Take care of an environment variable PGKRBSRVNAME.<br />
<br />
<h2><a id="09.01.0100">psqlODBC 09.01.0100</a></h2>
Changes:<br />
1.) SQLStatistics() sets 'D' for the collation column when an reverse index is used.<br />
2.) Fix the bug that PostgreSQL's function calls in queries cause a crash on SQL Server linked servers.<br />
3.) Fix the bug that the first fetch operation doesn't work properly when the operation is SQL_FETCH_ABSOLUTE or SQL_FETCH_LAST.<br />
4.) Revise the handling of decimal point.<br />
5.) Adjust the operations after closing eof-detected cursors.<br />
6.) Before dropping the statement, sync and discard the response from the server for the pending extended query.<br />
7.) Clear col_info(columns info) cache ehen DROP/ALTER TABLE is called so that later SQLDescribeCol() etc work properly.<br />
8.) Improve the handling of BYTEA type.<br />
9.) Don't clear the columns cache info when they are referenced.<br />
10.) Correct the column size of interval types.<br />
<br />
<h2><a id="09.00.0310">psqlODBC 09.00.0310</a></h2>
Changes:<br />
1.) Let SC_forget_unnamed() clear the result in case the statement is not executed yet. It would fix the bug reported by Silvio Brandani.<br />
2.) Fix the bug that strings are copied to a null pointer.<br />
3.) Don't clear the parsed plan in SC_recycle_statement().<br />
4.) Now SQLDescribeCol() can detect the changes of column type or size.<br />
5.) Handle *with or without oids* correctly.<br />
6.) Take the environment variable into account.<br />
7.) Use SOCK_get_next_n_bytes() instead of SOCK_get_next_byte().<br />
8.) Add some driver specific options for SQLSetConnectAttr().<br />
9.) Fix compilation errors in case ODBC 2.5.<br />
10.) Fix compilation error on different ODBCVER.<br />
11.) Correct the behavior of SQLSetConnectAttr() for the driver specific options.<br />
<br />
<h2><a id="09.00.0300">psqlODBC 09.00.0300</a></h2>
Changes:<br />
1.) Don't propgate the connection level statment options to the internal statements. This fixes an infinite loop reported by Nelson Andre.<br />
2.) Improved a mylog output.<br />
3.) Fix the bug introduced by the previous change reprted by Adrien de Croy.<br />
4.) Divide SC_returns_rows() macro into several categories and make SQLResultNumCols(), SQLDescribeCol() or SQLColAttribute() available <br />
for insert/update/delete .. returning statements.<br />
5.) Initialize flags member in QResultClass before calling QR_set_rowstart_in_cache() per report from Arno Moore.<br />
6.) Applied a patch by Taizo Ito and correct the length of BIT type in Postgres.<br />
7.) Change to read and skip the rest of result data when out of memory occurs while reading tuples so that we can continue to use the connection.<br />
8.) Fix the bug that Access autonumber fields are not detected in 9.0.0200 reported by Arnaud Lesauvage.<br />
9.) Convert large integer strings properly.<br />
10.) Fix the trouble introduced by the change *Return 0 for the column size when the size of numeric items are unknown* per report from Marco Gaiarin.<br />
11.) Remove a meaningless if clause. This had a problem with ltdl function.<br />
<br />
<h2><a id="09.00.0200">psqlODBC 09.00.0200</a></h2>
Changes:<br />
1.) Fix a bug about sizeof() at idx_fake_oid of info.<br />
2.) Return 0 for the column size when the size of numeric items are unknown.<br />
 Also improve the calculation of scale of numeric items when it is not explicitly specified.<br />
3.) Change to  use 'if' instead of an inappropriate 'else if' at cursor of convert.<br />
4.) Remember to set permanent flag to holdable cursors on commit with no precedent rollback (to savepoint) operations.<br />
 This fixes a crash bug in case of cursor operations across transaction.<br />
5.) Fix a bug about the handling of the SQL_RETRIEVE_DATA option.<br />
 Per report by Andreas.<br />
6.) Fix cursor bug introduced by the previous change.<br />
 Per report by Andreas.<br />
7.) Move the setting of folder name of libpq or gssapi related dlls from .wxs file to .bat file.<br />
8.) Fix a bug which returns incorrect values for SQL_DATETIME_SUB.<br />
<br />
<h2><a id="09.00.0101">psqlODBC 09.00.0101</a></h2>
Changes:<br />
1.) Fix build source of Windows 64bit environment.<br />
<br />
<h2><a id="09.00.0100">psqlODBC 09.00.0100</a></h2>
Changes:<br />
1.) Allow password which contains special characters like {,},=,;.<br />
2.) Add a new data source option which makes it possible to use Kerberos for Windows library to reply to GSSAPI authentication request.<br />
3.) Native support for SSPI Kerberos or Negaotiate service. It may be useful for the 64-bit drivers.<br />
4.) Fix an oversight of Memory overflow handling.<br />
5.) Removed "#define SQL_WCHART_CONVERT" which  causes a trouble on some platforms.<br />
6.) Removed the use of misused strcat_s together with snprintf_s (bug report from Jap-Peter Seifert) and use strlcat instead of strncat.<br />
7.) Fix a bug about pre-execute behavior in case of protocol v2 or earlier.<br />
8.) Use poll() instead of select() when it's available.<br />
9.) Take comments or line comments in a query into account.<br />
10.) Fix a crash bug on authentication failures.<br />
11.) Take --without-iodbc(unixODBC) configure option into account.<br />
12.) Apply the patch by Peter Crabtree which fixes a crash bug.<br />
13.) Improve the handling of bools_as_char case.<br />
14.) Fix a bug when creating a connection string.<br />
15.) Use pg_get_expr(adbin, ..) instead of unreliable adsrc in pg_attrdef so as to know the sequence name associated with serial items.<br />
16.) Added 64-bit version of installer files.<br />
17.) Introduce pgtype_attr_xxxx functions which take a typmod parameter as well as a type oid parameter as an extension of pgtype_xxxx functions so that SQLColumns and SQLDescribeCol(SQLColAttrinute) could use common functions.<br />
18.) Call PQconnectdbParams instead of PQconnectdb when it's available.<br />
19.) Make cursor open check at transaction end a little more effective.<br />
20.) Added code for SQL_INTERVAL support and refcursor support though they are disabled.<br />
21.) Correct the handling of dynamic cursors so that they are substituted by keyset-driven ones.<br />
22.) Remove a compilation error and some compiler warnings under unixdODBC 2.3 environment.<br />
23.) Make sure the support of the backward-compatibility version of getaddrinfo() family even when _WIN32_WINNT is supplied.<br />
24.) Update win64.mak so that gssapi support is available without libpq.<br />
<br />
<h2><a id="08.04.0200">psqlODBC 08.04.0200</a></h2>
Changes:<br />
1.) Fix a column uodatability problem reported by Tom Goodman.<br />
2.) Display SSL mode list properly on setup dialog.<br />
3.) Don't truncate the result of msgtowstr()/wstrtomsg().<br />
4.) Implement ConfigDriver() function.<br />
5.) check of the SQLLEN definition by the unixODBC version by SQLColAttribute.<br />
6.) Take WITH cte staments into account.<br />
7.) Fix a bug about UTF8 handling.<br />
8.) Wait a ReadyForQuery Message after errors correctly.<br />
9.) Fix a problem with {call procedure reported by Wolfgang Pasche.<br />
10.) Cleanups about the handing of unnamed parsed statements and the handling of ODBC escape { .<br />
11.)Link ws2_32.lib in case the compilation environment #defines _WIN32_WINNT and the value >= 0x0501.<br />
12) Added --with(out)-libpq[=DIR} option to configure.<br />
13) Revise autoconf/automake so that libpq/ssl header/libs are resolved at configure phase.<br />
14) Use md5.c directly instead of win_md5.c.<br />
15) Suppress some compiler warnings.<br />
16) Fix memory leaks on connection failure (Shouji morimoto).<br />
17) Suppress some compilation errors and warnings.<br />
18) Fix SSL connection timeout.<br />
<br />
<h2><a id="08.04.0100">psqlODBC 08.04.0100</a></h2>
Changes:<br />
1.) Avoid a crash on exit when using SSL connections by resetting CRTPTO_xx_callbacks before unloding libpq.<br />
2.) Correct the funtion name DiscardRollbackState pointed out by Zoltan Boszormenyi.<br />
3.) Correct the value of INDEX_QUALIFIER column which returned by SLQSTATISTICS();<br />
4.) Take domain types into account in SQLColumns() (Thanks to Luiz K. Matsumura).<br />
5.) Take RESTRICT actions into account in SQLForeignKeys() (report from Farid Zidan).<br />
6.) Fix a bug that small negative decimal values are mistaken for non-negative (bug report from Dominic Smith).<br />
7.) Use MSG_NOSIGNAL/MSG_NOSIGPIPE option on send()/recv() to avoid crash on SIGPIPE (bug report from Brian Feldman).<br />
8.) Remove a spurious "." with no trailing digits in timestamp representation (bug report from Brian Feldman).<br />
9.) Rename trim() funtion in order to avoid conflict of function name(report from Dominic Smith).<br />
10.) Put back the change to add *read only* clause for read only cursors.<br />
11.) Improve pgtype_transfer_octet_length().<br />
12.) Fix a bug reported by Milen Manev that SQLExec *select for a table* -> SQLDescribeCol() -> add a column to the table -> SQLExec *select for the table* -> SQLDescribeCol() for the added column causes a bad result.<br />
13.) Use strncpy_null() instead of strncpy().<br />
14.) Close (holdable) cursors on commit if possible.<br />
15.) Recycle columns cache info if the size becomes pretty large.<br />
16.) Add a 'verify-ca' and 'verify-full' to the sslmode option via libpq of version 8.4.<br />
17.) Add a functionality to change the directory for logging.<br />
18.) Correct the error code for communication errors.<br />
19.) Correct the conversion between UTF-16 and UTF-8 for non UCS2 characters.<br />
20.) Try to convert (especially connection error) messages using local conversions when they are not valid unicode characters.<br />
21.) Add a textbox to setup dialog to change the directory for logging.<br />
22.) Allow multiple Connsettings statements in connection string by enclosing them by braces({}).<br />
23.) Improve the transactional control under useDeclareFetch mode.<br />
24.) Take the platforms where char is unsigned into account per report from Alex Goncharov.<br />
25.) Improve the handling of UUID type especially to support IMPORT or LINK in MS Access.<br />
<br />
<h2><a id="08.03.0400">psqlODBC 08.03.0400</a></h2>
Changes:<br />
1.) GUID forgot to set the value to the buffer.<br />
2.) -Wall was taken as gcc limitation.<br />
<br />
<h2><a id="08.03.0300">psqlODBC 08.03.0300</a></h2>
Changes:<br />
1.) SQLGUID type support thanks to Jan-Willem Goossens.<br />
2.) Fix a bug about silently adding a *for read only* clause.<br />
3.) Fix a 64bit mode bug about handling of arrays of parameters.<br />
4.) Change the implemetatin of SQLForeignKeys() for 8.3+ servers.<br />
5.) Not commit the transaction too early in useDeclareFetch mode.<br />
6.) Add a cursor open check for SQLPrepare().<br />
7.) Reset the column binding information after SQLMoreResults().<br />
8.) Save the rowset size properly for the FETCH_NEXT operation in case of >= 3.0 drivers.<br />
9.) Support FE/BE communications on Big Endian platform.<br />
10.) Check strerror_r function's return type.<br />
11.) Suppress some compiler warnings.<br />
<br />
<h2><a id="08.03.0200">psqlODBC 08.03.0200</a></h2>
Changes:<br />
1.) Fix a bug in socket which uses a socket variable.<br />
2.) Support column alias without "as" so that links from the SQLServer work.<br />
3.) Take ';' into account when the driver adds "for read only" clause.<br />
4.) Use the E'.. ' notation not only in '=' expressions but also in LIKE expressions.<br />
5.) Change to return milliseconds parts for timestamp fields.<br />
6.) Change to return a specific sqlstate in case of multiple parameters.<br />
7.) Fix bug of the selection not using SSL.<br />
<br />
<h2><a id="08.03.0100">psqlODBC 08.03.0100</a></h2>
Changes:<br />
1.) Correct the flow of trial of multi protocols and fix related bugs about handling of connection errors.<br />
2.) Use SSPI service for SSL support when libpq is unavailable.<br />
3.) Fix a bug in copy_and_convert_field() when fetching bookmark columns. This bug could occur in case no suitable?
 lo type is found.<br />
4.) Improve the parse statement operation so that it detect srf in (from clause).<br />
5.) Correct the COLUMN_LENGTH return value of SQLColumns() for varchar/bpchar type columns (Unicode driver).<br />
6.) Change to not return database name if case of MS Query.<br />
7.) The first cut to use Windows SSPI. The trial to use Schannel service for SSL support.<br />
8.) Be more careful about <for locking clause> in UseDeclareFetch mode. "for read only" clause for read only queries
 for 8.3 or later servers for safety.<br />
<br />
<h2><a id="08.02.0500">psqlODBC 08.02.0500</a></h2>
Changes:<br />
1.) Correct the format of Bind message under 64bit environment.<br />
2.) Fixed build of without OpenSSL.<br />
<br />
<h2><a id="08.02.0403">psqlODBC 08.02.0403</a></h2>
Changes:<br />
1.) Support SQLColAttribute for MS specific SQL_CA_SS_COLUMN_KEY. Some MS applications use this.<br />
2.) Improve the check of updatability of queries by checking if they have multiple tables.<br />
3.) Reduce the round trip overhead in FE/BE communications(especially in useDeclareFetch mode).<br />
4.) Fix a bug in ResolveOneParam() pointed out by Rainer Bauer.<br />
5.) Add a flag which lets SQLTables() show only accessible tables.<br />
6.) The unicode driver now can handle utf-16 surrogate pairs.<br />
<br />
<h2><a id="08.02.0402">psqlODBC 08.02.0402</a></h2>
Changes:<br />
1.) Fix some bugs in case without MSDTC support.<br />
2.) Refine the realloc handling.<br />
3.) Put back the @@IDENTITY implementation so as not to use lastval().<br />
4.) Change SQLColumns() to return correct column length in the Unicode driver.<br />
5.) Remove the connection count limitation.<br />
6.) Fix Protocol=7.4--1 notation (should be Protocol=7.4).<br />
7.) Fix a typo in socket.c (bug report from Rainer bauer).<br />
8.) Add CC_set_autocommit to psqlodbc(a).def files.<br />
9.) Handle Standard_conforming_strings.<br />
10.) Handle standard_conforming_strings also in case via libpq.<br />
11.) Fix a bug which doesn't free connection list properly.<br />
12.) Fix DelayLoadDLL was made explicit of psqlodbc.proj file.<br />
<br />
<h2><a id="08.02.0401">psqlODBC 08.02.0401</a></h2>
Changes:<br />
1.) Fix a bug which checking join is confused by CR+LF.<br />
2.) Handle AUTOCOMMIT mode more carefully in a distributed transaction so as not to issue COMMIT unexpectedly.<br />
3.) Allow the UNIX domain configuration (the same as libpq).<br />
4.) Fixed the automake/autoconf scripts.(by Peter Eisentraut)<br />
<br />
<h2><a id="08.02.0400">psqlODBC 08.02.0400</a></h2>
Changes:<br />
1.) Fixed control binding of SetField problem.<br />
2.) Fixed pgenlist.h losts to the release package.<br />
<br />
<h2><a id="08.02.0300">psqlODBC 08.02.0300</a></h2>
Changes:<br />
1.) Allow non-admin or Vista users to create log fils in the home
directory.<br />
2.) Fix an index over bug which causes a crash or an unexpected result.<br />
<br />
<h2><a id="08.02.0205">psqlODBC 08.02.0205</a></h2>
Changes:<br />
1.) Append DETAIL messages to GetDiag...() messages.<br />
2.) Use SQL_SUCCEEDED macros so as to simplify the code.<br />
3.) Use lastval() function to replace IDENTITY on 8.1 or later servers.<br />
4.) Remove WSAStartup() and WSACleanup() from DllMain.<br />
5.) Load libpq from the driver's folder.<br />
6.) Use QR_get_value_backend_int/_text() funcs instead of QR_get_value_backend_row().<br />
7.) Improve the implemetation of SQLSetPos(.., SQL_ADD/SQL_UPDATE) using the 8.2 new feature INSERT/UPDATE .. returning.<br />
8.) Seaparate DTC code as a Delayload DLL.<br />
<br />
<h2><a id="08.02.0204">psqlODBC 08.02.0204</a></h2>
Changes:<br />
1.) Configure the combination of time.h and sys/time.h.<br />
2.) Treat the tables in information_schema as system tables.<br />
3.) Correct the precision of SQL_NUMERIC_STRUCT.<br />
4.) Change the default max varchar size from 254 to 255.<br />
5.) Reset the fields information properly in case of SQLMoreResults.<br />
6.) Implement SQLDescribeParam() also in case of multi-command queries.<br />
7.) Handle dollar-quotes more properly.<br />
8.) Provide a make option to link dynamic multithread library.<br />
9.) Set the default nullablity to TRUE.<br />
10.) Parse command delimiters(;) more correctly. <br />
11.) Use QR_get_value_backend_text() or QR_get_value_backend_int()  <br />
12.) instead of QR_get_value_backend_row().<br />
13.) Apply Parse statement or disallow premature properly.<br />
14.) Reset current_schema cache in case 'set search_path ..' command is issued.<br />
<br />
<h2><a id="08.02.0203">psqlODBC 08.02.0203</a></h2>
Changes:<br />
1) Fix a bug which forgets unnamed plans too early especially when handling large objects.<br />
2) Don't treat charcters whose value >= 128 as alphanumeric in case of conversion of binary data to bytea.<br />
3) Change ConfigDSN() so that it takes the options in Setup Dialog page 1 into account.<br />
4) Simplify the memory management of statements'columns info so as to prevent memory leaks or a crash in parse_statement etc.<br />
5) SQLTables("", SQL_ALL_SCHEMAS. "", ..) now returns a list of valid schemas.<br />
6) SQLTables("", "", "", SQL_ALL_TABLE_TYPES) now returns a list of valid table types.<br />
7) SQLGetInfo SQL_DATABASE_NAME now returns the database name.<br />
8) Improve the automatic setting mechanism of the client_encoding for Windows code page 125x (ANSI drivers only).<br />
<br />
<h2><a id="08.02.0202">psqlODBC 08.02.0202</a></h2>
Changes:<br />
1) Change to use NULL indicator instead of the length buffer in SQLFetch.<br />
2) Fix long -> serial conversion error in MS Access.<br />
<br />
<h2><a id="08.02.0201">psqlODBC 08.02.0201</a></h2>
Changes:<br />
1) Ditinguish the indicaitor and the octet_length field of APD clcearly.<br />
2) Handle @@IDENTITY more generally.<br />
3) Take outer join into account so as to evaluate nullability.<br />
4) Fix a bug about Keyset-driven cursors.<br />
<br />
<h2><a id="08.02.0200">psqlODBC 08.02.0200</a></h2>
Changes:<br />
1) Fix some bugs or warnings on 64 bit OS.<br />
2) Avoid backend crash caused by Execute Requests for committed holdable cursors.<br />
<br />
<h2><a id="08.02.0105">psqlODBC 08.02.0105</a></h2>
Changes:<br />
1) SQLStatistics now returns indices based on expression also.<br />
2) Add a TEST button on the setup dialog.<br />
<br />
<h2><a id="08.02.0104">psqlODBC 08.02.0104</a></h2>
Changes:<br />
1) Take 64bit mode into account for the format parameter of (s(n))printf, sscanf etc.<br />
2) getpid() instead of _getpid()<br />
3) SQLGetInfo(SQL_NULL_COLLATION) now returns SQL_NC_HIGH instead of SQL_NC_END<br />
4) Remove the function SQLParamOptions from ODBC3.0.<br />
<br />
<h2><a id="08.02.0103">psqlODBC 08.02.0103</a></h2>
Changes:<br />
1) Improve the handling of connection error messages.<br />
2) Add an option to convert empty strings to NULL.<br />
3) Handle domain type as the basetype.<br />
4) Fake MSS in case of not only SQLExecute but also SQLParamData.<br />
5) Prevent SQLColumns from displaying system columns.<br />
6) Unload delayLoaded libraries on dll detach (not on disconnect time).<br />
7) Fix a SQLGetDiagField crash bug.<br />
8) Fix a insertion count bug.<br />
9) Take win98 cases into account a little.<br />
<br />
<h2><a id="08.02.0102">psqlODBC 08.02.0102</a></h2>
Changes:<br />
1) Compensate a loss of report of being Jet when using MS Access.<br />
2) Add NULL <-> "" date converion function for FOXPRO and<br />
   revise parse/describe/execute mechanism.<br />
3) Miscellaneous type changes for 64 bit drivers.<br />
<br />
<h2><a id="08.02.0101">psqlODBC 08.02.0101</a></h2>
Changes:<br />
1) Delayload import XOLEHLP.dll so that the driver can be loaded<br />
   without the existence of the dll.<br />
2) Fix a simple password authentication bug.<br />
3) Fix a buffer overrun bug which prevented the connection phase<br />
   from retrying another version appropriately.<br />
4) Handle multi-addresses of a specified host properly.<br />
5) Refine the socket handling(connect, recv, send).<br />
6) Display more appropriate error messages in the connection phase.<br />
<br />
<h2><a id="08.02.0100">psqlODBC 08.02.0100</a></h2>
Changes:<br />
1) Return to Unicode/ANSI driver distribution as some users still find one works better than the other for them.<br />
2) Improve connection error message in case of invalid protocol characters.<br />
3) Initial value has set MSDTC=no of VC6 (Support of MSDTC is only VC7 and VC8)<br />
4) Addition which is a driver name in a resource (Unicode or ANSI)<br />
<br />
<h2><a id="08.02.0007">psqlODBC 08.02.0007</a></h2>
Changes:<br />
1) Fix some SQLPrimaryKey, SQLForeignKey bugs.<br />
   Fill PK_NAME or FK_NAME columns.<br />
   Return right update_rule values.<br />
   Remove duplicates.<br />
2) Handle SQL_ALL_SCHEMAS parameter in SQLTables. <br />
3) Handle unaligned indicator/length buffers more properly.<br />
4) Fix a bug in ProcedureColumns in case of set returning functions.<br />
5) Fix a buffer overrun in handle_notice_message (Bart Samuel)<br />
6) Fix a output parameters problem (Bart Samuel)<br />
7) Hold the connection lock while a rollbackable statement running.<br />
8) Add Extra Opts option to the DSN option setupdialog.<br />
<br />
<h2><a id="08.02.0006">psqlODBC 08.02.0006</a></h2>
Changes:<br />
1) Add an option to fake Microsoft SQL Server which would improve SERIAL type handling.<br />
2) Add support for LOGIN_TIMEOUT.<br />
3) Improve Statement error handling about the reference of Connection error.<br />
4) Improve the handling BIGINT type in the OSs without having strtoll().<br />
5) Support ODBC CONVERT scalar functions in some cases.<br />
6) Close qlog, mylog files on detach dll.<br />
7) Improve comunication performance in case of the driver's original socket.<br />
8) Fix send a close <br />
9) Support of IPV6.<br />
<br />
8.2.0003-8.2.0005 was skipped by the situation.<br />
<br />
<h2><a id="08.02.0002">psqlODBC 08.02.0002</a></h2>
Changes:<br />
1) SQL injections via ODBC catalog function calls.<br />
2) Fix SQLNumParams problem related to literal or dollar quote.<br />
3) Call libpq in case of Kerberos authentication.<br />
4) Add E' before literal for after 8.1 severs.<br />
5) Return the correct error message in case of no password.<br />
6) Take E'...' literal expression into account.<br />
7) Fix an SQL_C_WCHAR -> numeric type conversion problem.<br />
8) Refine the handling of io or output parameters.<br />
9) Refine the dollar quote handling.<br />
10) Fix the client_encoding mismatch problem.<br />
11) Fix for SQLStatistics returns UNKNOWN instead of real column names.<br />
<br />
<h2><a id="08.02.0001">psqlODBC 08.02.0001</a></h2>
Changes:<br />
1) updated CVS tip to the REL-07_03_ENHANCED branch<br />
2) updated the installer for the single driver distribution<br />
3) standardised various filenames that were previously based on build types<br />
4) standardised the build on ODBC version 3.51<br />
<hr>

Release notes for older versions are <a href="release-7.3.html">here</a>

</body>
</html>
